package com.huangsm.book.designmodel.parallel.future;

import java.util.concurrent.Callable;

/**
 * @author huang
 * @PACKAGE_NAME com.huangsm.book.designmodel.parallel.future
 * @PROJECT_NAME concurrence
 * @date 2019/2/18
 */
public class JDKRealData implements Callable<String> {
    private String para;

    public JDKRealData(String para) {
        this.para = para;
    }

    @Override
    public String call() throws Exception {
        //真实业务
        StringBuffer sb=new StringBuffer();
        for (int i = 0; i < 10; i++) {
            sb.append(para);
            Thread.sleep(100);
        }
        return sb.toString();
    }
}
